package migrations

import "zero_server/pkg/migration"

type AdminRule struct {
	ID       uint   `gorm:"column:id;type:int(11);primaryKey;autoIncrement:true;comment:菜单ID" json:"id"`
	Name     string `gorm:"column:name;type:varchar(100);not null;default:'';comment:菜单名称" json:"name"`
	Path     string `gorm:"column:path;type:varchar(100);null;default:'';comment:标识" json:"path"`
	Url      string `gorm:"column:url;type:varchar(100);null;default:'';comment:路由文件" json:"url"`
	Redirect string `gorm:"column:redirect;type:varchar(100);null;default:'';comment:重定向路径" json:"redirect"`
	Type     uint8  `gorm:"column:type;type:tinyint(4);not null;default:1;comment:菜单类型:1=模块,2=目录,3=菜单,4=页面类型,5=操作或数据列" json:"type"`
	AuthOpen uint8  `gorm:"column:auth_open;type:tinyint(4);not null;default:1;comment:是否验证权限:0=否,1=是" json:"auth_open"`
	Icon     string `gorm:"column:icon;type:varchar(50);null;default:'';comment:图标" json:"icon"`
	Pid      uint   `gorm:"column:pid;type:int(11);not null;default:0;comment:父级ID" json:"pid"`
	migration.SetMigrationStatus
	migration.SetMigrationSort
	migration.SetMigrationDate
}
